package com.heima.search.repository;

import com.heima.search.entity.ApUserSearch;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface ApUserSearchRepository extends MongoRepository<ApUserSearch, String> {


    /**
     * 查询前五条记录
     * @param userId
     * @return
     */
    public List<ApUserSearch> findTop5ByUserIdOrderByCreatedTime(Integer userId);
}
